#!/usr/bin/python
# encoding: utf-8
'''
@File    :   code.py
@Time    :   2020/03/11 21:54:19
@Author  :   fangkaijin 
@Version :   1.0
@Contact :   fangkaijin@gmail.com
@License :   杭州移动互联
@Desc    :   None
'''

# 导入库包

import sys, os
import time

def timeit(func):
    def wrapper():
        start = time.time()
        func()
        end = time.time()
        print('执行 func 需要 %f .' % (end - start))
    return wrapper

@timeit
def foo():
    print('function : foo')

f = foo()